package cn.iocoder.yudao.module.system.dal.mysql.fieldsetting;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.fieldsetting.FieldSettingDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.fieldsetting.vo.*;

/**
 * 列表显示设置 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface FieldSettingMapper extends BaseMapperX<FieldSettingDO> {

    default PageResult<FieldSettingDO> selectPage(FieldSettingPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FieldSettingDO>()
                .eqIfPresent(FieldSettingDO::getType, reqVO.getType())
                .eqIfPresent(FieldSettingDO::getValue, reqVO.getValue())
                .betweenIfPresent(FieldSettingDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FieldSettingDO::getId));
    }

}